package cn.gok.entity;

import cn.gok.factory.YamlConfigFactory;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
    @PropertySource : 用来读取自定义的配置文件
 */
@Component
@Data
@PropertySource(value = "classpath:myjdbc.yml",factory = YamlConfigFactory.class)
@ConfigurationProperties(prefix = "my.datasource")
public class MyDataSource1 {

    private String dirver;

    private String username;

    private String password;

    private Integer size;
}
